﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

using LeMigue.Scrum.Iterface.Model;

namespace LeMigue.Scrum.Iterface.Model
{
    /// <summary>
    /// Representa um projeto pertencente a Equipe
    /// </summary>
    public class Project : ScrumItem, IHasChild<Project>
    {
        /// <summary>
        /// Armazena SubProjetos de um 
        /// </summary>
        private IList<Project> _child = new List<Project>();

        public Project(int id, string title)
            : base(id, title)
        {
        }

        public IList<Project> Child
        {
            get { return new ReadOnlyCollection<Project>(_child); }
        }

        public void AddChild(Project child)
        {
            _child.Add(child);
        }
    }
}
